﻿Public Class FormHistoryEmployee

    Private Sub FormHistoryEmployee_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LoadData()
    End Sub

    Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged
        LoadData()
    End Sub
    Private Sub LoadData()
        Cmd.Parameters("@s") = "%" & txtSearch.Text & "%"
       Cmd.ExecuteDataTable("UPDATE TBL_EMPLOYEE SET Active=1 WHERE Active =0 AND UPPER (Employee_Name) LIKE UPPER('%'+@s+'%')")
    End Sub

    Private Sub btnRestor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRestor.Click
        Cmd.ExecuteNonQuery("UPDATE TBL_EMPLOYEE SET Active ='0'")
        LoadData()
    End Sub
End Class